extends StatusInterface

# 此怪物只会左右移动，并且遇到障碍物会反转
func _physics_process(_delta):
	owner.move_and_slide()
	if  owner.is_on_floor():
		if owner.velocity.y>5:
			manage_node.to_death()
		else:
			manage_node.to_walk()
 
func _process(delta):
	owner.velocity.y += owner.gravity * delta 
	owner.velocity.x = move_toward(owner.velocity.x, 0, owner.acceleration * delta)
	owner.set_face_direction(owner.direction)

